<?php

class SidebarPlugin extends Zend_Controller_Plugin_Abstract
{
	
	// This function is called before Zend_Controller_Front enters its dispatch loop.
	// http://framework.zend.com/manual/en/zend.controller.plugins.html
	public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
	{
		$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
		$viewRenderer->initView();
		$view = $viewRenderer->view;

		$sidebar = $view->placeholder('sidebar');
   		$sidebar->setPrefix('<div id="sidebar-item">')
           		->setSeparator('</div><div class="sidebar-item">')
           		->setPostfix('</div>');
		
        
           		
        $sidebar->append("LLLAARS");
        
        $sidebar->append("WOOPSs");
        /*
		if (Zend_Auth::hasIdentity()) {
		    $username = Zend_Auth::getIdentity()->username;
		    $content = 'Welcome back, <b>' . $view->escape($username) . '</b>';
		} else {
		    $content = '<a href="/login">Login</a>';
		}
		$view->placeholder('sidebar')->append($content);
		*/

	}
}